import { createRouter, createWebHistory } from 'vue-router'


// 路由表
const routes = [
  {
    path: '/about',
    name: 'About',
    component: () => import('@/views/About')
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/views/Home')
  },
  {
    path: '/my',
    name: 'My',
    component: () => import('@/views/My')
  },
  {
    path: '/detail/:id',
    name: 'Detail',
    component: () => import('@/views/Detail')
  }
  
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
